<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>  </title>
    <style>
        body{
            margin: 40px auto;
            text-align: center;
        }
        .box{
            width: 200px;
            height: 200px;
            background-color: red;
            margin: 40px auto;
            text-align: center;
        }
    </style>
</head>
<body>
    <div class="box"></div>
    <button id="btn">动画</button>
    
</body>
<script src="../lib/font/jquery.min.js"></script>
<script>
    $(function(){
        $('#btn').click(function(){
            //1.1上拉
            // $('.box').slideUp();

            //1.2淡出
            //$('.box').fadeOut();
            

            //显示动画
           // $('.box').slideDown();
           // $('.box').fadeIn();


           //切换

          // $('.box').slideToggle();
           $('.box').fadeToggle();

        });
        
    });
</script>
</html>